<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_WARNING",false);?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<link rel="stylesheet" href="http://localhost/kksblog/Admin/Tpl/Public/css/public.css" />
	<title></title>

</head>
<body>
	<form action="<?php echo U('edit');?>" method="post" enctype="multipart/form-data">
		<table class="table">
			<tr >
				<td class="th" colspan="2">编辑博文</td>
			</tr>
			<tr>
				<td>博文标题</td>
				<td>
					<input type="text" name="title" value="<?php echo $article['title'];?>"/>
					
				</td>
			</tr>
			<tr>
				<td>缩略图</td>
				<td><input type="file" name="thumb"/><img src="<?php echo $article['thumb'];?>" alt="" style="width:50px;height:50xp" /> </td>
			</tr>
			<tr>
				<td>栏目</td>
				<td>
					<select name='cid'>
						<option value="">====选择栏目====</option>
						<?php $hd["list"]["n"]["total"]=0;if(isset($category) && !empty($category)):$_id_n=0;$_index_n=0;$lastn=min(1000,count($category));
$hd["list"]["n"]["first"]=true;
$hd["list"]["n"]["last"]=false;
$_total_n=ceil($lastn/1);$hd["list"]["n"]["total"]=$_total_n;
$_data_n = array_slice($category,0,$lastn);
if(count($_data_n)==0):echo "";
else:
foreach($_data_n as $key=>$n):
if(($_id_n)%1==0):$_id_n++;else:$_id_n++;continue;endif;
$hd["list"]["n"]["index"]=++$_index_n;
if($_index_n>=$_total_n):$hd["list"]["n"]["last"]=true;endif;?>

							<?php if($n['cid'] == $article['cid']){?>
								<option value="<?php echo $n['cid'];?>" selected="selected"><?php echo $n['cname'];?></option>
							<?php  }else{ ?>
								<option value="<?php echo $n['cid'];?>"><?php echo $n['cname'];?></option>
							<?php }?>
						<?php $hd["list"]["n"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
					</select>
				</td>

			</tr>
			<tr>
				<td>内容</td>
				<td>
					<script type="text/javascript" charset="utf-8" src="http://localhost/kksblog/code/codephp/Extend/Org/Editor/Ueditor/ueditor.config.js"></script><script type="text/javascript" charset="utf-8" src="http://localhost/kksblog/code/codephp/Extend/Org/Editor/Ueditor/ueditor.all.min.js"></script><script type="text/javascript">UEDITOR_HOME_URL="http://localhost/kksblog/code/codephp/Extend/Org/Editor/Ueditor/"</script><script id="hd_con" name="con" type="text/plain"></script>
    <script type='text/javascript'>
        var ue = UE.getEditor('hd_con',{
        imageUrl:'http://localhost/kksblog/admin.php/Article&m=ueditor_upload&water=1&uploadsize=2000000&maximagewidth=false&maximageheight=false'//处理上传脚本
        ,zIndex : 0
        ,autoClearinitialContent:false
        ,initialFrameWidth:"900" //宽度1000
        ,initialFrameHeight:"300" //宽度1000
        ,autoHeightEnabled:false //是否自动长高,默认true
        ,autoFloatEnabled:false //是否保持toolbar的位置不动,默认true
        ,maximumWords:2000 //允许的最大字符数
        ,initialContent:'<?php echo $article['content'];?>' //初始化编辑器的内容 也可以通过textarea/script给值
        ,readonly : false //编辑器初始化结束后,编辑区域是否是只读的，默认是false
        ,wordCount:true //是否开启字数统计
        
    });
    </script>
			</tr>
			<tr>
				<td>点击次数</td>
				<td>
					<input type="" name='click' value="<?php echo $article['click'];?>"/>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<input type="hidden" name="aid" value="<?php echo $_GET['aid'];?>"/>
					<input type="submit" value="修改" class="input_button"/>
					<input type="reset" class="input_button"/>
				</td>
			</tr>
		</table>
	</form>
</body>
</html>